package com.family.gmall.user.controller;

import com.family.gmall.model.user.UserAddress;
import com.family.gmall.user.service.UserAddressService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;

/**
 * @Auther: family
 * @Date: 2023/8/5 08:51
 * @Description:
 */
@RestController
@RequestMapping("/api/user")
public class UserController {

    @Resource
    private UserAddressService userAddressService;

    @ApiOperation("获取用户地址")
    @ApiImplicitParam(name = "userId", value = "userId", required = true)
    @GetMapping("inner/findUserAddressListByUserId/{userId}")
    public List<UserAddress> findUserAddressListByUserId(@PathVariable("userId") String userId) {
        return userAddressService.findUserAddressListByUserId(userId);
    }
}
